Which of the following words is not related to 'laughing'?

Updated: 2 months ago
  • ক
    screaming
  • খ
    smiling
  • গ
    giggle
  • ঘ
    chucle
80
ব্যাখ্যাঃ

Question:

What is the worst-case time complexity of searching for an element in a balanced Binary Search Tree (BST) containing n elements?

Options:

        
  • A) O(1)
  •     
  • B) O(log n)
  •     
  • C) O(n)
  •     
  • D) O(n log n)

Correct Answer: B) O(log n)


Detailed Explanation:

In a Binary Search Tree (BST), each node has at most two children. The left subtree contains values strictly smaller than the node, while the right subtree contains values strictly greater.

Why O(log n) is correct:

        
  • In a balanced BST (such as an AVL tree or Red-Black tree), the height of the tree is strictly kept at O(log n).
  •     
  • At each comparison step, the search eliminates roughly half of the remaining nodes.
  •     
  • Therefore, in the worst-case scenario, the algorithm traverses from the root down to the deepest leaf node, requiring at most steps proportional to the tree's height, which is O(log n).

Why the other options are incorrect:

        
  • A) O(1): Constant time is typical for direct array indexing or hash table lookups (on average), not tree traversals where decisions must be made across levels.
  •     
  • C) O(n): Linear time occurs in an unbalanced (skewed) BST where the tree degrades into a linked list. However, the problem explicitly specifies a balanced tree.
  •     
  • D) O(n log n): This is the standard time complexity for efficient comparison-based sorting algorithms (such as Merge Sort or Heap Sort), not a search operation on an already constructed BST.
Satt AI
Satt AI
2 weeks ago
শিক্ষকদের জন্য বিশেষভাবে তৈরি

১ ক্লিকে প্রশ্ন, শীট, সাজেশন ও
অনলাইন পরীক্ষা তৈরির সফটওয়্যার!

শুধু প্রশ্ন সিলেক্ট করুন — প্রশ্নপত্র অটোমেটিক তৈরি!

প্রশ্ন এডিট করা যাবে
জলছাপ দেয়া যাবে
ঠিকানা যুক্ত করা যাবে
Logo, Motto যুক্ত হবে
অটো প্রতিষ্ঠানের নাম
অটো সময়, পূর্ণমান
প্রশ্ন এডিট করা যাবে
জলছাপ দেয়া যাবে
ঠিকানা যুক্ত করা যাবে
Logo, Motto যুক্ত হবে
অটো প্রতিষ্ঠানের নাম
অটো সময়, পূর্ণমান
অটো নির্দেশনা (এডিটযোগ্য)
অটো বিষয় ও অধ্যায়
OMR সংযুক্ত করা যাবে
ফন্ট, কলাম, ডিভাইডার
প্রশ্ন/অপশন স্টাইল পরিবর্তন
সেট কোড, বিষয় কোড
অটো নির্দেশনা (এডিটযোগ্য)
অটো বিষয় ও অধ্যায়
OMR সংযুক্ত করা যাবে
ফন্ট, কলাম, ডিভাইডার
প্রশ্ন/অপশন স্টাইল পরিবর্তন
সেট কোড, বিষয় কোড
এখনই শুরু করুন ডেমো দেখুন
৫০,০০০+
শিক্ষক
৩০ লক্ষ+
প্রশ্নপত্র

Related Question

মাত্র ১৫ পয়সায় প্রশ্নপত্র
১ ক্লিকে প্রশ্ন, শীট, সাজেশন তৈরি করুন আজই

Complete Exam
Preparation

Learn, practice, analyse and improve

1M+ downloads
4.6 · 8k+ Reviews

Question Analytics

মোট উত্তরদাতা

জন

সঠিক
ভুল
উত্তর নেই